import Vue from "vue";
import Vuex from 'vuex'
import getters from './getters'
import user from "./modules/user";

import createPersistedState from 'vuex-persistedstate'
Vue.use(Vuex)

export default new Vuex.Store({
    modules: { user },
    getters,
    plugins: [
        createPersistedState({
            key: 'GongMian',
            paths: ['user.token', 'user.userInfo'],
            storage: window.localStorage
        })
    ]
})